﻿/**
addOnLoad(onloadedfunctionname);  //  to execute the function when page loaded
*/
var onLoadedArray=new Array();
var isFirstOnLoad=true;
function onloadedExecute()
{
	for(var i=0;i<onLoadedArray.length;i++)
	{
		var call=onLoadedArray[i];
		if(typeof(call) == 'function')
		{
			call();
		}
	}
}
function addOnLoad(func)
{
	if((null != window.onload)&&isFirstOnLoad)
	{
		onLoadedArray.push(window.onload);
	}
	isFirstOnLoad=false;
	onLoadedArray.push(func);
	window.onload=onloadedExecute;
}
